<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script>
        /* 
            需求：判断数组当中是否包含指定的元素
         */

         const array1 = [1,2,3,4,5,6];
         let isInclude = array1.includes(21);
        //  console.log(isInclude)

        const array2 = ['aa','bb','cc'];
        let isInclude2 = array2.includes('aa',-2);
        console.log(isInclude2)
    </script>
</head>
<body>
    
</body>
</html>